package com.org.dao.impl;

import java.sql.SQLException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;

import com.org.IbatisBaseDao;
import com.org.dao.ILogDao;
import com.org.model.Log;
import com.org.model.Qqemail;
import com.org.utils.servlet.ServletUtils;
@Component
@SuppressWarnings("all")
public class LogDaoImpl extends IbatisBaseDao implements ILogDao {
	
	private Logger logger=Logger.getLogger(LogDaoImpl.class);
	
	public Map<String, Object> getLogLists(Map<String, Object> params) {
		Map<String, Object> result;
		try {
			result = new HashMap<String, Object>();
			Integer total = (Integer) sqlMapClient.queryForObject("findLogCount", params);
			List queryForList = sqlMapClient.queryForList("findLogLists", params);
			List<Map<String, Object>> list = queryForList;
			result.put("total", total);
			result.put("list", list);
			return result;
		} catch (Exception e) {
			logger.info("find getLogLists"+ e.getMessage());
			e.printStackTrace();
		}
		return null;
	
	}

	public Log getLogById(String primaryKey) {
		//sqlMapClient.queryForList(arg0, arg1, arg2)
		return null;
	}

	public void insertLog(Log entity) {
		try {
			sqlMapClient.insert("insertLog", entity);
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

	public void updateLogById(Log entity) {
		
	}

 
 
}
